home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sources
/
libxpm
/
libxpm34.gz
/
libxpm34
/
xpm-3.4
/
lib
/
XpmWrFFrData.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-14
|
1KB
|
36 lines
/* Copyright 1989-94 GROUPE BULL -- See license conditions in file COPYRIGHT */
/*****************************************************************************\
* XpmWrFFrData.c: *
* *
* XPM library *
* Parse an Xpm array and write a file that corresponds to it. *
* *
* Developed by Dan Greening dgreen@cs.ucla.edu / dgreen@sti.com *
\*****************************************************************************/
#include "xpmP.h"
int
XpmWriteFileFromData(filename, data)
char *filename;
char **data;
{
XpmImage image;
XpmInfo info;
int ErrorStatus;
info.valuemask = XpmReturnComments | XpmReturnExtensions;
ErrorStatus = XpmCreateXpmImageFromData(data, &image, &info);
if (ErrorStatus != XpmSuccess)
return (ErrorStatus);
ErrorStatus = XpmWriteFileFromXpmImage(filename, &image, &info);
XpmFreeXpmImage(&image);
XpmFreeXpmInfo(&info);
return (ErrorStatus);
}